import {customeStruct} from '../utils';
const itf = customeStruct.interface;

export const InitData = itf({
    payload: itf({
        brands: [itf({
            id: 'string',
            name: 'string'
        })],
    })
});
export const List = itf({
    payload: itf({
        content: [itf(Object.assign({
            id: 'string',
            code: 'string',
            serviceName: 'string',
            serviceType: 'number',
            chargeMode: 'number',
            scope: 'number',
            startTime: 'datetime',
            endTime: 'datetime',
            status: 'number',
            rowVersion: 'string',
        }))],
        totalElements: 'number',
    })
});
export const Detail = itf({
    payload: itf(Object.assign({
        id: 'string',
        code: 'string',
        serviceName: 'string',
        serviceType: 'number',
        chargeMode: 'number',
        scope: 'number',
        startTime: 'datetime',
        endTime: 'datetime',
        status: 'number',
        rowVersion: 'string',
        materials: [
            itf({
                id: 'string',
                usedPartId: 'string',
                newPartId: 'string',
            })
        ],
        workItems: [
            itf({
                workItemId: 'string',
            })
        ],
        vehicles: [
            itf({
                id: 'string',
                vin: 'string',
            })
        ],
        conditions: [
            itf({
                id: 'string',
                conditionName: 'number',
                operator: 'number',
            })
        ],
    }))
});
